Fix PR#22433. The algorithm is_partitioned was testing an item in the middle of the sequence twice. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227824 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/algorithm b/include/algorithm index 9c51284..e8720cc 100644 --- a/include/algorithm +++ b/include/algorithm
@@ -3148,6 +3148,9 @@ for (; __first != __last; ++__first) if (!__pred(*__first)) break; + if ( __first == __last ) + return true; + ++__first; for (; __first != __last; ++__first) if (__pred(*__first)) return false;